1. Field of the Invention
The present invention relates in general to a motion vector estimation apparatus in a digital video coding system and a method thereof, and more particularly to a motion estimation method and apparatus for, prior to a motion vector estimation operation, determining whether to perform it and selectively performing the motion vector estimation operation in accordance with the determined result, thereby reducing the amount of power consumed.
2. Description of the Prior Art
Generally, video signal compression coding and decoding can desirably reduce the capacity of memory necessary for storing image information as well as transmit the image information over a low-rate channel. In this regard, such compression coding and decoding techniques occupy a very important part of the multimedia industry requiring a variety of image applications such as image storage, image transmission, etc.
FIG. 1 is a block diagram showing the construction of a conventional digital video coding system. For the efficient video compression coding, there is generally used a method for estimating a motion vector with reference to a previous frame for the coding of a current frame, performing a motion compensated prediction operation using the estimated motion vector and coding the resulting prediction error. With reference to FIG. 1, the conventional video coding system comprises a transform unit 20 for performing a transform operation for a frame difference between an input current frame and a motion compensated prediction frame obtained by a motion compensation predictor 10, a quantizer 30 for quantizing transform coefficients from the transform unit 20 for data compression, a variable length coder 40 for performing a variable length coding (VLC) operation for the transform coefficients quantized by the quantizer 30, a dequantizer 50 and an inverse transform unit 60. In this coding system, the frame difference is reconstructed by the dequantizer 50 and inverse transform unit 60 and applied to the motion compensation predictor 10, which then adds it to the motion compensated prediction frame to obtain a reconstructed frame. On the other hand, the motion compensation predictor 10 performs a motion vector estimation operation using the input current frame and the previous frame and finds the prediction frame using an estimated motion vector. The motion compensation predictor 10 also performs a motion compensated prediction operation and transfers the estimated motion vector to the variable length coder 40, which then variable length codes and transmits it together with the transform coefficients quantized by the quantizer 30. An image information bit stream output from the variable length coder 40 is transmitted to a receiver or a multiplexer for its multiplexing with other signals.
In a general video coding method and system, motion prediction and compensation operations are not performed on a frame basis, but in the unit of a predetermined number of picture elements or pixels (M pixels in the horizontal direction and N pixels in the vertical direction, typically indicated by Mxc3x97N pixels). This group of pixels is typically called a macroblock. It is generally prescribed that the macroblock be sized with 16 pixels in the horizontal direction and 16 pixels in the vertical direction (referred to hereinafter as xe2x80x9c16xc3x9716xe2x80x9d). In the present invention, although the size of the macroblock is not limited to a specific value, it will be described as 16xc3x9716 as an example for the convenience of description. A motion vector is two-dimensional information indicative of the quantity of motion of an object in the previous and current frames on two-dimensional X-Y coordinates. Namely, the motion vector consists of a transversal motion value and a longitudinal motion value.
FIG. 2 is a detailed block diagram of the motion compensation predictor 10 in the conventional digital video coding system of FIG. 1. As shown in this drawing, the motion compensation predictor 10 includes a motion compensation unit 11 for performing a motion compensation operation, a motion estimation unit 12 for performing a motion vector estimation operation, and a previous image reconstruction unit 13 for obtaining a reconstructed version of the previous frame to be used to obtain the motion compensated prediction frame. The previous image reconstruction unit 13 obtains a reconstructed version of the coded frame by adding the reconstructed version of the frame difference transferred from the inverse transform unit 60 to a previous reconstructed frame stored therein. The reconstructed frame obtained by the previous image reconstruction unit 13 is then used as an input to the motion estimation unit 12 for the motion estimation of the subsequent input frame. The motion estimation unit 12 performs the motion vector estimation operation for the coding of the current input frame on the basis of the output frame from the previous image reconstruction unit 13 and the current input frame and outputs the resulting motion vector, which is then transferred to the variable length coder 40 for its variable length coding. The variable length coder 40 can code input values with a much smaller number of bits than fixed length coding (FLC) by assigning a smaller number of bits to a value with a higher generation frequency and a larger number of bits to a value with a lower generation frequency, respectively. On the other hand, the motion vector output from the motion estimation unit 12 is applied to the motion compensation unit 11, which then performs the motion compensation operation using the applied motion vector and thus finally produces the prediction frame.
As an alternative, the previous original frame may be used as an input frame for the motion estimation instead of the previous reconstructed frame. In this case, a memory for storing the previous original frame must be provided in the construction of FIG. 2. It should be noted that the use of the previous original frame as the reference frame is valid only for the motion estimation and the previous reconstructed frame is always used as the input to the motion compensation unit. The reason is that a decoder is able to perform a decoding operation on the basis of the previous reconstructed frame. Hereinafter, both the frames will be referred to as reference frames.
A motion vector has a close correlation with the surrounding blocks or macroblocks because of image characteristics. Accordingly, the coding efficiency can be increased by variable length coding a difference vector between a current motion vector and a motion vector predicted using motion vectors of the surrounding blocks or macroblocks, rather than directly variable length coding the current motion vector. The reason is that the difference vector is 0 or a value approximate to 0 at a significantly high frequency.
FIG. 3 is a view showing the position of a macroblock to be currently coded and the positions of the surrounding macroblocks used for the prediction of a motion vector of the macroblock to be currently coded. Generally, a predicted motion vector can be determined using adjacent motion vectors in the following manner. That is, the predicted motion vector is determined as the median value of motion vectors of three macroblocks, or the left macroblock MB_A, the upper macroblock MB_B and the upper right macroblock MB_C, around a macroblock (MB_X) to be currently coded. A difference vector between the determined predicted motion vector and the current motion vector is obtained and then variable length coded. This method is typically used in ITU-T H.263 and ISO/IEC MPEG-4.
FIG. 4 is a detailed block diagram of the motion estimation unit 12 in the motion compensation predictor 10 of FIG. 2. For motion vector estimation, there have generally been proposed a full search method, pyramidal search method, three-step search method, four-step search method, etc., which have different computational complexities. Particularly among them, the full search method requires a considerable amount of computation, but has the best performance. In the conventional video coding system, the motion estimation unit 12 is basically composed of two parts, or a first motion estimator 121 and a second motion estimator 122. The first motion estimator 121 performs an integer-pixel-unit motion vector estimation operation. For example, the first motion estimator 121 may perform the motion vector estimation operation in the unit of one pixel in the full search method and in the unit of one pixel or of two or more pixels in the pyramidal search method, respectively. Namely, the motion vector estimation unit of the first motion estimator 121 depends on the search method. The second motion estimator 122 searches more minutely for motion vectors around a motion vector 1 obtained by the first motion estimator 121, namely, generally performs a half-pixel-unit motion vector estimation operation. The first motion estimator 121 and the second motion estimator 122 perform their respective operations using frames stored in a memory 123.
As stated previously, the motion vector estimation operation is performed on a macroblock basis. This motion vector estimation signifies a procedure for searching a reference frame for a portion most similar to the current frame block. Generally, a reference frame is a frame just before a frame to be currently coded, in terms of time. But, for a bidirectional predicted frame (B frame) of MPEG-2, a reference frame may be a frame after a frame to be currently coded, in terms of time. Therefore, the previous frame expressed in the above description made in conjunction with FIGS. 1 and 2 is a reference frame, correctly speaking. Further, a reference frame may be either the original frame or reconstructed frame, as stated previously.
A conventional motion vector estimation method does not utilize information of macroblocks surrounding a macroblock of a current frame, but searches a previous frame for a portion most similar to the current frame macroblock. The conventional motion vector estimation method is also adapted to perform a motion vector estimation operation uniformly with respect to all blocks. Generally in the video coding system, the motion vector estimation operation requires the largest amount of computation. For this reason, the execution of the motion vector estimation operation for all blocks increases the coding time period in terms of software and the mount of power consumption of the motion estimation unit in terms of hardware, respectively.
Therefore, the present invention has been made in view of the above problems, and it is an object of the present invention to provide a motion estimation method and apparatus for determining whether to estimate a motion vector of a current block, on the basis of motion vectors of blocks around the current block, and selectively performing the motion vector estimation operation in accordance with the determined result, thereby reducing the coding time period and the amount of power consumed.
In accordance with one aspect of the present invention, the above and other objects can be accomplished by the provision of a motion estimation apparatus comprising motion vector estimation determination means for receiving motion vectors and motion prediction errors of macroblocks surrounding a macroblock to be currently coded and determining whether to perform a motion vector estimation operation, on the basis of the received motion vectors and motion prediction errors; a motion vector estimation unit for performing the motion vector estimation operation in response to a motion vector estimation enable signal from the motion vector estimation determination means; a switch for selecting one of the outputs from the motion vector estimation determination means and motion vector estimation unit in accordance with the result determined by the motion vector estimation determination means; and a memory for storing an input frame and a reference frame and providing the stored input frame and reference frame to the motion vector estimation determination means and motion vector estimation unit.
In accordance with another aspect of the present invention, there is provided a motion estimation apparatus comprising motion vector estimation determination means for receiving motion vectors and motion prediction errors of macroblocks surrounding a macroblock to be currently coded and determining whether to perform a motion vector estimation operation, on the basis of the received motion vectors and motion prediction errors; a first motion vector estimation unit for performing the motion vector estimation operation in a relatively large pixel unit in response to a motion vector estimation enable signal from the motion vector estimation determination means; a switch for selecting one of outputs from the motion vector estimation determination means and first motion vector estimation unit in accordance with the result determined by the motion vector estimation determination means; a second motion vector estimation unit for performing the motion vector estimation operation in a relatively minute pixel unit using a motion vector selected by the switch; and a memory for storing an input frame and a reference frame and providing the stored input frame and reference frame to the motion vector estimation determination means, first motion vector estimation unit and second motion vector estimation unit.
In accordance with yet another aspect of the present invention, there is provided a motion estimation method comprising first determining a predicted motion vector referring to a plurality of macroblocks surrounding a macroblock to be currently coded, as a predicted motion vector; the second step of performing a motion compensated prediction operation for the macroblock to be currently coded, using the predicted motion vector selected at the above first step, to obtain a motion compensated prediction error; the third step of determining a threshold value using motion prediction errors of the macroblocks surrounding the macroblock to be currently coded; the fourth step of determining whether the motion compensated prediction error obtained at the above second step is smaller than or equal to the threshold value determined at the above third step; the fifth step of performing no motion vector estimation operation and determining the predicted motion vector selected at the above first step as the final motion vector, if it is determined at the above fourth step that the motion compensated prediction error obtained at the above second step is smaller than or equal to the threshold value determined at the above third step; and the sixth step of performing the motion vector estimation operation to determine an estimated motion vector as the final motion vector, if it is determined at the above fourth step that the motion compensated prediction error obtained at the above second step is greater than the threshold value determined at the above third step.